package com.furongji.education.controller.admin;

import com.furongji.education.service.OrderService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Tag(name = "订单数据统计管理")
@RequiredArgsConstructor
@RestController
@RequestMapping("/admin/orders")
public class OrderStatisticsController {

    private final OrderService orderService;

    @Operation(summary = "订单数量统计")
    @GetMapping("/orderCount/{date}")
    public Integer orderCount(@PathVariable String date) {
        Integer orderCount = orderService.orderCount(date);
        return orderCount;
    }

}
